<?php

namespace Admin\Models\bpm;

use Admin\Models\BaseModel;

class XHBpmNode extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iNodeId;

    /**
     *
     * @var string
     * @Column(type="string", length=100, nullable=true)
     */
    public $sNodeName;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sExcuteDeps;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sRelatIds;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sExcuteIds;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $sRelatDeps;

    public $mDesc;
    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iTPId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iSort;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $retain1;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $retain2;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=true)
     */
    public $retain3;

    /**
     *
     * @var integer
     * @Column(type="integer", length=4, nullable=true)
     */
    public $bDelete;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iCreateUserId;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tLastModifyDate;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iLastModifyUserId;

    /**
     * 节点内容
     *
     * @var string
     * @Column(type="string", nullable=true)
     *
     * create by dale 20180810
     */
    public $sContent;

    /**
     * 父节点id
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iParentId;

    /**
     * 标准标识
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iTargetId;


    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        parent::initialize();
        $this->setSource("XHBpm_Node");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHBpm_Node';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHBpmNode[]|XHBpmNode|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XHBpmNode|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
